package cate.common.game.trace.entity;

import cate.common.game.trace.GameTraceUtils;
import cate.common.game.trace.SQLiteHelper;
import cate.common.game.trace.SQLiteTextLength;
import easy.mysql.map.KeyType;
import easy.mysql.map.anno.MyColumn;
import easy.mysql.map.anno.MyTable;
import lombok.ToString;

import javax.persistence.GenerationType;
import java.util.Date;

@ToString
@MyTable(table = RoleTraceCareerLog.TABLE, generationType = GenerationType.AUTO, comment = "主角生涯打点数据日志")
public class RoleTraceCareerLog {
    public static final String TABLE = "role_trace_career_log";
    @SQLiteTextLength(length = 32)
    @MyColumn(comment = "角色ID", keyType = KeyType.PRIMARY)
    public String role_id;
    @SQLiteTextLength(length = 64)
    @MyColumn(comment = "账号ID")
    public String open_id;
    @MyColumn(comment = "注册时间")
    public Date register_time;
    @MyColumn(comment = "最后登录时间")
    public Date login_time;
    @MyColumn(comment = "离线时间")
    public Date logout_time;
    @MyColumn(comment = "服务器ID")
    public int server_id;
    @SQLiteTextLength(length = 32)
    @MyColumn(comment = "用户名")
    public String username;
    @MyColumn(comment = "当前等级")
    public int current_level;
    @MyColumn(comment = "战力")
    public long power;
    @MyColumn(comment = "登录次数")
    public int login_count;
    @MyColumn(comment = "在线时长")
    public long online_time;
    @MyColumn(comment = "在线天数")
    public int online_day;
    @MyColumn(comment = "连续登录天数")
    public int continuous_online_day;
    @MyColumn(comment = "首次充值时间")
    public Date first_pay_time;
    @MyColumn(comment = "最后充值时间")
    public Date last_pay_time;
    @MyColumn(comment = "总充值金额")
    public long total_pay_amount;
    @MyColumn(comment = "总充值次数")
    public int total_pay_num;
    @MyColumn(comment = "钻石存量")
    public long diamond;
    @MyColumn(comment = "金币存量")
    public long gold;
    @MyColumn(comment = "VIP等级")
    public int vip_level;
    @MyColumn(comment = "VIP经验")
    public long vip_exp;
    @MyColumn(comment = "首次充值金额")
    public long first_recharge_num;
    @MyColumn(comment = "首次充值类型")
    public int first_recharge_type;
    @MyColumn(comment = "首次充值天数")
    public int first_buy_day;
    @MyColumn(comment = "当前月卡是否开启")
    public boolean current_month_pass;
    @MyColumn(comment = "当前引导进度")
    public int guide_id;
    @MyColumn(comment = "当前主线任务进度")
    public int main_task_id;
    @MyColumn(comment = "当前冒险进度")
    public int adventure_id;
    @MyColumn(comment = "好友数量")
    public int friend_num;
    @MyColumn(comment = "聊天次数")
    public int chat_count;
    @MyColumn(comment = "公会聊天次数")
    public int club_chat_count;
    @MyColumn(comment = "创建公会次数")
    public int create_club_count;
    @MyColumn(comment = "加入公会次数")
    public int join_club_count;
    @MyColumn(comment = "入会时长")
    public long in_club_time;
    @MyColumn(comment = "是否在公会内")
    public boolean in_club;
    @MyColumn(comment = "好友赠礼赠予次数")
    public int friend_gift_give_count;
    @MyColumn(comment = "好友赠礼领取次数")
    public int friend_gift_get_count;
    @MyColumn(comment = "积分赛排名")
    public int point_race_rank;
    @MyColumn(comment = "积分赛挑战次数")
    public int point_race_count;

    public static String initSql() {
        return GameTraceUtils.sql(TABLE);
    }

    public static void main(String[] args) {
        SQLiteHelper.generateSQLiteSQL(RoleTraceCareerLog.class);
    }
}
